// 引入封装的 axios 扩展
import axiosex from "../axiosex";
import type { IDeviceInfo } from "@/models/IDeviceInfo";
import type { IBaseRequest } from "@/models/IBaseRequest";
import type { IBaseResponse } from "@/models/IBaseResponse";
import type { IBasePagingData } from "@/models/IBasePagingData";
import type { IQueryByIntID } from "@/models/IQueryByIntID";

/**插入设备信息 */
export const DeviceInfo_AddData = (data: IDeviceInfo) =>
  axiosex.post(
    "/api/DeviceInfo/AddData",
    data
  ) as unknown as IBaseResponse<IDeviceInfo>;
/**删除设备信息 */
export const DeviceInfo_DeleteData = (data: IQueryByIntID) =>
  axiosex.delete("/api/DeviceInfo/DeleteData", {
    params: data,
  }) as unknown as IBaseResponse<Number>;

/**更新设备信息 */
export const DeviceInfo_UpdateData = (data: IDeviceInfo) =>
  axiosex.put(
    "/api/DeviceInfo/UpdateData",
    data
  ) as unknown as IBaseResponse<Number>;
/**根据主键查询设备信息 */
export const DeviceInfo_GetData = (data: IQueryByIntID) =>
  axiosex.get("/api/DeviceInfo/GetData", {
    params: data,
  }) as unknown as IBaseResponse<IDeviceInfo>;
/**分页查询设备信息 */
export const DeviceInfo_GetPageData = (data: IBaseRequest<IDeviceInfo>) =>
  axiosex.post("/api/DeviceInfo/GetPageData", data) as unknown as IBaseResponse<
    IBasePagingData<IDeviceInfo>
  >;